"""
本章节研究的是多线程

"""
import  threading
import time


def sing():
    while True:
         print("我在唱歌，啦啦啦.......")
         time.sleep(1)

def dance(msg):
    while True:
        print(msg)
        time.sleep(1)

# 多线程模式运行
sing_thread=threading.Thread(target=sing)
dance_thread=threading.Thread(target=dance,args={"我在跳舞，哈哈哈"})

sing_thread.start()
dance_thread.start()



# 多线程模式运行
sing_thread=threading.Thread(target=sing)
dance_thread=threading.Thread(target=dance,kwargs={"msg":"我在跳舞,哈哈哈哈哈哈哈"})

sing_thread.start()
dance_thread.start()




